{template 'member','header'}
<script language="JavaScript">
function checkform(money)
{
    if(money > 0)
	{
	    alert('余额不足，请先充值！');
		return false;
	}
	return true;
}
</script>
<div id="main">
  {template 'order' , 'left'}
  <div id="right">
    <p id="position"><strong>当前位置：</strong><a href="">首页</a><a href="{$MODULE[member][url]}">会员中心</a><a href="{$M[url]}">订单</a>确认付款</p>
    <div class="clear"></div>
    <table cellpadding="0" cellspacing="1" class="table_list">
      <caption>订单信息</caption>
		<tr>
           <th>产品</th>
           <th width="12%">单价</th>
           <th width="8%">数量</th>
           <th width="10%">运费</th>
           <th width="10%">总价</th>
        </tr>
		<tr>
            <td class="align_l"><a href="{$goodsurl}">{$goodsname}</a></td>
            <td>{$price}元/{$unit}</td>
            <td>{$number}{$unit}</td>
            <td>{$carriage}元</td>
            <td>{$amount}元</td>
        </tr>
	</table>
	<form name="myform" action="{$M[url]}index.php?action=pay&orderid={$orderid}" method="post" onsubmit="return checkform({$money})">
    <table cellpadding="0" cellspacing="1" class="table_info">
      <caption>确认付款</caption>
		<tr>
           <th width="15%">付款金额：</th>
           <td style="color:red;font-size:14px;font-weight:bold;">{$amount} 元</td>            
        </tr>
        <tr>
          <th>帐户余额：</th>
          <td style="color:blue">{$_amount} 元 {if $_amount < $amount}&nbsp;&nbsp;&nbsp;&nbsp;账户余额不够，请<a href="{$MODULE[pay][url]}showpayment.php?action=type&pay=online&amount={$money}&forward={urlencode(URL)}" style="color:red">立即充值</a>。{/if}</td>
        </tr>
        <tr>
          <th></th>
          <td><input type="submit" name="dosubmit" value="确认付款"></td>
        </tr>
	</table>
    </form>
  </div>
</div>
<div class="clear"></div>
{template 'member','footer'}
